let router = require("express").Router();
const UserController = require("../controller/user");
const PositionController = require("../controller/position");
const upload =require("../util/upload");
//api.js专门处理路由
// 处理user相关的请求
router.post("/user/register", UserController.register);
router.post("/user/login", UserController.login);
router.post("/user/isLogin", UserController.isLogin);
router.get("/user/logout", UserController.logout);

//处理职位相关的请求
router.get("/position/get",PositionController.get);
router.post("/position/add",upload.single("logo"),PositionController.add);

module.exports = router;